package com.gcxy.dto.Account;

import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotEmpty;

import javax.validation.constraints.Pattern;
import java.io.Serializable;

/**
 * @auther:韦林鹏 `*@since:2023/12/14 14 12
 * @description:
 */
@Data
public class LoginDto implements Serializable {

    @NotEmpty(message = "登录账号不能为空")
    @Length(min = 5,max = 20,message = "账号长度为5-20")
    @Pattern(regexp = "^YZ\\d+$",message = "账号只能是YZ+数字")
    private String account;
    @NotEmpty(message = "密码不能为空")
    @Length(min = 6,max = 20,message = "账号长度为6-20")
    @Pattern(regexp = "^[A-Za-z0-9]+$",message = "密码只能是数字和字母")
    private String password;
}
